Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 18, 2025

Summary by CodeRabbit

  • New Features

    • Added unified grader output object for evaluation results.
    • Extended grader configuration with max_completions_tokens and reasoning_effort.
    • Introduced configurable search context size and ranker version options.
  • Refactor

    • Consolidated multiple inline enums into shared, public types for messages, images, environments, and ranking.
    • Removed legacy “-2” schema variants in favor of standardized models.
  • Documentation

    • Updated examples to use the latest model and new sampling parameters.
    • Enhanced descriptions for messages and response-related fields.

@coderabbitai
Copy link

coderabbitai bot commented Sep 18, 2025

Walkthrough

Refactors and expands OpenAPI spec in src/libs/tryAGI.OpenAI/openapi.yaml by adding shared schemas/enums, updating references to use them, introducing EvalRunOutputItemResult, extending ScoreModelGrader sampling_params, updating examples/descriptions, and removing legacy “-2” schema variants.

Changes

Cohort / File(s) Summary of changes
New shared schemas and enums
src/libs/tryAGI.OpenAI/openapi.yaml
Added schemas: EvalRunOutputItemResult, ImageDetail, ComputerEnvironment1, DetailEnum, SearchContextSize, RankerVersionType, MessageRole, MessageStatus.
Refactor to shared references
src/libs/tryAGI.OpenAI/openapi.yaml
Message.role → MessageRole; Message.status → MessageStatus; RankingOptions.ranker → RankerVersionType; InputImageContent.environment → ComputerEnvironment1; InputImageContent.detail → ImageDetail; usage.search_context_size → SearchContextSize.
Removal of legacy -2 variants
src/libs/tryAGI.OpenAI/openapi.yaml
Removed: ContainerFileCitationBody-2, FileCitationBody-2, UrlCitationBody-2, InputImageContent-2, InputTextContent-2, InputFileContent-2, OutputTextContent-2, LogProb-2, TopLogProb-2, Annotation-2, RefusalContent-2.
Grader configuration updates
src/libs/tryAGI.OpenAI/openapi.yaml
ScoreModelGrader.sampling_params adds max_completions_tokens and reasoning_effort. Introduced EvalRunOutputItemResult for grader outputs.
Documentation and examples
src/libs/tryAGI.OpenAI/openapi.yaml
Message gets a description. Score Model Grader example updated to model o4-mini-2025-04-16 with new sampling_params fields.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant API as Eval Runs API
  participant Grader as Grader Engine

  Client->>API: POST /eval-runs/{id}/execute
  API->>Grader: Evaluate output item(s)
  Grader-->>API: Result(s) per item (EvalRunOutputItemResult[])
  API-->>Client: 200 OK with results and usage (SearchContextSize)

  note over API,Grader: Sampling params may include max_completions_tokens and reasoning_effort
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

A nibble of enums, a hop through the spec,
I tidied the burrow, removed the old deck.
New roles and statuses, carrots aligned,
Graders now report with results well-defined.
With measured reasoning and tokens to spare—
Thump-thump! this YAML is lighter to bear. 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title Check ⚠️ Warning The title "feat:@coderabbitai" is not a meaningful summary of the changes in this PR; it reads like a mention or tag rather than a description of the primary work. The changes clearly target the OpenAPI spec (consolidating enums, adding EvalRunOutputItemResult, removing legacy "-2" schemas, and extending grader sampling parameters), none of which are conveyed by the title. Because it does not describe the main change, the title fails the check. Please replace the title with a concise, specific single-sentence summary of the primary change. Suggested examples: "feat(openapi): consolidate enums and add EvalRunOutputItemResult", "refactor(openapi): replace inline enums and remove legacy -2 schemas", or "feat(openapi): extend grader sampling_params with reasoning_effort and max_completions_tokens". Use a conventional commit style with scope (e.g., openapi) and avoid non-descriptive mentions like "@coderabbitai".
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bot/update-openapi_202509180111

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@HavenDV HavenDV merged commit 5d9f058 into main Sep 18, 2025
2 of 4 checks passed
@HavenDV HavenDV deleted the bot/update-openapi_202509180111 branch September 18, 2025 01:12
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:OpenAPI refactor: shared schemas, EvalRunOutputItemResult, remove -2 Sep 18, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (3)
src/libs/tryAGI.OpenAI/openapi.yaml (3)

9979-9982: Avoid null-only schema; align with chosen OAS version.

type: 'null' plus nullable: true is tool-fragile (OAS 3.0 disallows type: null; OAS 3.1 deprecates nullable). If the field is truly always null, drop it. If it’s optional, model as a union.

Option A (remove property if always null):

-        status:
-          type: 'null'
-          nullable: true

Option B (union; OAS 3.1 style):

-        status:
-          type: 'null'
-          nullable: true
+        status:
+          anyOf:
+            - { type: 'null' }
+            - { type: string }

Run a quick validation with your chosen linter to confirm compatibility.


18410-18413: Minor: description spacing can confuse formatters.

The multi-line string contains irregular spacing; non-blocking.

-      description: "Set of 16 key-value pairs that can be attached to an object. This can be         useful for storing additional information about the object in a structured         format, and querying for objects via API or the dashboard.\n        Keys are strings with a maximum length of 64 characters. Values are strings         with a maximum length of 512 characters."
+      description: "Set of up to 16 key–value pairs attached to an object. Useful for storing additional structured metadata and querying via API or dashboard. Keys: max 64 chars. Values: max 512 chars."

13876-13881: Consolidate duplicate enums — remove DetailEnum and reuse ImageDetail.

DetailEnum duplicates ImageDetail (low/high/auto). Remove DetailEnum from the OpenAPI spec, update any $ref to use ImageDetail, then regenerate the client code to remove the generated DetailEnum artifacts.

Definitions/targets: src/libs/tryAGI.OpenAI/openapi.yaml:13876 (DetailEnum) and src/libs/tryAGI.OpenAI/openapi.yaml:16102 (ImageDetail). Generated files referencing DetailEnum: src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DetailEnum.g.cs, src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DetailEnum*.g.cs, and entries in JsonSerializerContextTypes.g.cs.

Proposed removal:

-    DetailEnum:
-      enum:
-        - low
-        - high
-        - auto
-      type: string
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f4d3d2e and 93f5546.

⛔ Files ignored due to path filters (99)
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI..JsonSerializerContext.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.ConversationsClient.UpdateConversation.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.IConversationsClient.UpdateConversation.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.Annotation2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerCallOutputItemParamStatus.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerCallOutputItemParamStatusNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment1.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerEnvironment1Nullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerUsePreviewToolEnvironment.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ComputerUsePreviewToolEnvironmentNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerFileCitationBody2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContainerFileCitationBody2TypeNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ContentItem.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DetailEnum.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.DetailEnumNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FileCitationBody2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallItemStatus.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.FunctionCallItemStatusNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageDetail.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.ImageDetailNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFileContent2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputFileContent2TypeNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContent2Detail.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContent2DetailNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContent2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContent2TypeNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContentDetail.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.InputImageContentDetailNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputTextContent2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.OutputTextContent2TypeNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RankerVersionType.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.RankerVersionTypeNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SearchContextSize.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.SearchContextSizeNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchPreviewToolSearchContextSize.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonConverters.WebSearchPreviewToolSearchContextSizeNullable.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.JsonSerializerContextTypes.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Annotation2.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Annotation2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Annotation2Discriminator.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Annotation2Discriminator.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParam.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerCallOutputItemParamStatus.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerEnvironment1.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerScreenshotContent.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ComputerUsePreviewTool.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileCitationBody2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContainerFileCitationBody2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ContentItem.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ConversationItem.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalCompletionsRunDataSourceSamplingParams.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.CreateEvalResponsesRunDataSourceSamplingParams.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.DetailEnum.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItem.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResult.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResultSample.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.EvalRunOutputItemResultSample.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileCitationBody2.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FileCitationBody2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallItemStatus.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.FunctionCallOutputItemParam.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModel.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.GraderScoreModelSamplingParams.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.ImageDetail.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContent2.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContent2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputFileContent2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContent.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContent2.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContent2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputImageContent2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContent2.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContent2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.InputTextContent2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LogProb2.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.LogProb2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.Message.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageRole.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MessageStatus.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.MetadataParam.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputTextContent2.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputTextContent2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.OutputTextContent2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RankerVersionType.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RankingOptions.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RefusalContent2.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RefusalContent2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.RefusalContent2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SearchContextSize.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.SummaryTextContent.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TextContent.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TopLogProb2.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.TopLogProb2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UpdateConversationBody.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlCitationBody2.Json.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlCitationBody2.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.UrlCitationBody2Type.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewTool.g.cs is excluded by !**/generated/**
  • src/libs/tryAGI.OpenAI/Generated/tryAGI.OpenAI.Models.WebSearchPreviewToolSearchContextSize.g.cs is excluded by !**/generated/**
📒 Files selected for processing (1)
  • src/libs/tryAGI.OpenAI/openapi.yaml (23 hunks)
🔇 Additional comments (16)
src/libs/tryAGI.OpenAI/openapi.yaml (16)

10037-10037: LGTM: clearer description.


10174-10176: LGTM: shared enum ref for environment reduces drift.


11434-11435: LGTM: add reasoning_effort alongside max_completion_tokens.


11711-11712: LGTM: mirrored reasoning_effort here too.


14631-14632: LGTM: results now reference a reusable result schema.


15663-15667: LGTM on introducing a status enum; ensure usages match.

Confirm all status properties that should use this enum actually reference it (see Line 15690 below).


16102-16107: LGTM: ImageDetail enum centralizes detail values.


16686-16686: LGTM: refer to ImageDetail in InputFileContent.


17772-17782: LGTM: Message uses shared role/status enums; nice cleanup and docs.


18304-18320: LGTM: Public MessageRole/MessageStatus look sane; keep values stable.

Adding/removing enum values is breaking for many clients—treat changes here as versioned.

Consider documenting stability guarantees in release notes.


19432-19441: LGTM: externalize ranker versions; document stability of dated identifiers.

Add a note on how default-2024-11-15 evolves and whether auto is recommended for long-lived clients.


28135-28140: LGTM: SearchContextSize enum clarifies allowed values.


28323-28323: LGTM: clearer summary description.


28351-28351: LGTM: clearer text content description.


30076-30079: LGTM: reference shared SearchContextSize.


17757-17765: LGTM — verification passed

  • No $ref to "#/components/schemas/*-2" was found.
  • RefusalContent, InputTextContent, OutputTextContent, InputImageContent, and InputFileContent are each defined exactly once.

Comment on lines +10006 to +10013
ComputerEnvironment1:
enum:
- windows
- mac
- linux
- ubuntu
- browser
type: string
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Ubuntu vs Linux: adding a new enum value can break clients.

Including both linux and ubuntu introduces overlap and may be a breaking change for strict consumers. Recommend omitting ubuntu or documenting/versioning this change.

Apply:

     ComputerEnvironment1:
       enum:
         - windows
         - mac
-        - linux
-        - ubuntu
+        - linux
         - browser
       type: string

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In src/libs/tryAGI.OpenAI/openapi.yaml around lines 10006 to 10013, the new enum
value "ubuntu" overlaps with existing "linux" and can break strict clients;
remove the "ubuntu" enum entry from the schema (or alternatively revert this
change and add a clear semver-major version bump and changelog note if you must
keep it), update any example/usage docs to reflect the retained values, and add
a release note documenting the enum change and the required client
impact/versioning decision.

Comment on lines +14764 to +14788
EvalRunOutputItemResult:
title: EvalRunOutputItemResult
required:
- name
- score
- passed
type: object
properties:
name:
type: string
description: The name of the grader.
passed:
type: boolean
description: Whether the grader considered the output a pass.
sample:
type: object
description: Optional sample or intermediate data produced by the grader.
nullable: true
score:
type: number
description: The numeric score produced by the grader.
type:
type: string
description: 'The grader type (for example, "string-check-grader").'
description: "A single grader result for an evaluation run output item.\n"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Result schema includes “sample” which duplicates parent; shape mismatch with example.

EvalRunOutputItemResult.sample conflicts with the top-level output_item.sample shown in the example. Keep sample only at one level (prefer parent), or clearly differentiate (e.g., debug_sample).

Apply:

     EvalRunOutputItemResult:
       title: EvalRunOutputItemResult
       required:
         - name
         - score
         - passed
       type: object
       properties:
         name:
           type: string
           description: The name of the grader.
         passed:
           type: boolean
           description: Whether the grader considered the output a pass.
-        sample:
-          type: object
-          description: Optional sample or intermediate data produced by the grader.
-          nullable: true
         score:
           type: number
           description: The numeric score produced by the grader.
         type:
           type: string
           description: 'The grader type (for example, "string-check-grader").'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
EvalRunOutputItemResult:
title: EvalRunOutputItemResult
required:
- name
- score
- passed
type: object
properties:
name:
type: string
description: The name of the grader.
passed:
type: boolean
description: Whether the grader considered the output a pass.
sample:
type: object
description: Optional sample or intermediate data produced by the grader.
nullable: true
score:
type: number
description: The numeric score produced by the grader.
type:
type: string
description: 'The grader type (for example, "string-check-grader").'
description: "A single grader result for an evaluation run output item.\n"
EvalRunOutputItemResult:
title: EvalRunOutputItemResult
required:
- name
- score
- passed
type: object
properties:
name:
type: string
description: The name of the grader.
passed:
type: boolean
description: Whether the grader considered the output a pass.
score:
type: number
description: The numeric score produced by the grader.
type:
type: string
description: 'The grader type (for example, "string-check-grader").'
🤖 Prompt for AI Agents
In src/libs/tryAGI.OpenAI/openapi.yaml around lines 14764 to 14788, the schema
defines EvalRunOutputItemResult.sample which duplicates the parent
output_item.sample and the example shows a different shape; remove the nested
sample field or rename it (e.g., debug_sample) and update its schema and example
to match the new name or eliminate it so only the parent sample remains; update
any $ref/usages and the example objects to reflect the single canonical sample
location, and run schema validation to ensure shapes match the example.

Comment on lines +15690 to 15691
type: 'null'
nullable: true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Status modeled as null conflicts with new enum.

If FunctionCallItemStatus (Lines 15663–15667) is authoritative, allow union with null rather than null-only.

-        status:
-          type: 'null'
-          nullable: true
+        status:
+          anyOf:
+            - $ref: '#/components/schemas/FunctionCallItemStatus'
+            - { type: 'null' }

Align with your OAS version (use nullable only if staying on 3.0).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
type: 'null'
nullable: true
status:
anyOf:
- $ref: '#/components/schemas/FunctionCallItemStatus'
- { type: 'null' }
🤖 Prompt for AI Agents
In src/libs/tryAGI.OpenAI/openapi.yaml around lines 15690-15691, the schema
currently models a null-only status which conflicts with the
FunctionCallItemStatus enum defined at lines 15663–15667; update the schema to
allow the enum values or null (i.e., a union) instead of null-only—if your
OpenAPI version is 3.1+, represent this as a oneOf/anyOf with the enum schema
and a {"type":"null"}, or if you remain on 3.0.x use the nullable: true flag on
the enum schema so the enum can also be null; ensure the final representation
matches the file's OAS version.

Comment on lines +15971 to 15993
properties:
max_completions_tokens:
minimum: 1
type: integer
description: "The maximum number of tokens the grader model may generate in its response.\n"
nullable: true
reasoning_effort:
$ref: '#/components/schemas/ReasoningEffort'
seed:
type: integer
description: "A seed value to initialize the randomness, during sampling.\n"
nullable: true
temperature:
type: number
description: "A higher temperature increases randomness in the outputs.\n"
nullable: true
top_p:
type: number
description: "An alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n"
default: 1
nullable: true
example: 1
description: The sampling parameters for the model.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Inconsistent property name: max_completions_tokens vs max_completion_tokens.

Elsewhere you use max_completion_tokens. This pluralization drift will break clients.

         sampling_params:
           type: object
           properties:
-            max_completions_tokens:
+            max_completion_tokens:
               minimum: 1
               type: integer
               description: "The maximum number of tokens the grader model may generate in its response.\n"
               nullable: true
             reasoning_effort:
               $ref: '#/components/schemas/ReasoningEffort'

Add a deprecated alias only if you must support both for a transition.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
properties:
max_completions_tokens:
minimum: 1
type: integer
description: "The maximum number of tokens the grader model may generate in its response.\n"
nullable: true
reasoning_effort:
$ref: '#/components/schemas/ReasoningEffort'
seed:
type: integer
description: "A seed value to initialize the randomness, during sampling.\n"
nullable: true
temperature:
type: number
description: "A higher temperature increases randomness in the outputs.\n"
nullable: true
top_p:
type: number
description: "An alternative to temperature for nucleus sampling; 1.0 includes all tokens.\n"
default: 1
nullable: true
example: 1
description: The sampling parameters for the model.
sampling_params:
type: object
properties:
max_completion_tokens:
minimum: 1
type: integer
description: "The maximum number of tokens the grader model may generate in its response.\n"
nullable: true
reasoning_effort:
$ref: '#/components/schemas/ReasoningEffort'
🤖 Prompt for AI Agents
In src/libs/tryAGI.OpenAI/openapi.yaml around lines 15971 to 15993, the schema
uses the inconsistent property name max_completions_tokens; change the canonical
property to max_completion_tokens (singular "completion") and update all
references/examples to that name, and if you must support the old name during a
transition add max_completions_tokens as an alias property that has the exact
same schema type/constraints but is marked deprecated (add deprecated: true and
a description pointing users to max_completion_tokens) so both parse the same
value while signaling clients to migrate.

description: "A ScoreModelGrader object that uses a model to assign a score to the input.\n"
x-oaiMeta:
example: "{\n \"type\": \"score_model\",\n \"name\": \"Example score model grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": (\n \"Score how close the reference answer is to the model answer. Score 1.0 if they are the same and 0.0 if they are different.\"\n \" Return just a floating point score\\n\\n\"\n \" Reference answer: {{item.label}}\\n\\n\"\n \" Model answer: {{sample.output_text}}\"\n ),\n }\n ],\n \"model\": \"gpt-4o-2024-08-06\",\n \"sampling_params\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"seed\": 42,\n },\n}\n"
example: "{\n \"type\": \"score_model\",\n \"name\": \"Example score model grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": (\n \"Score how close the reference answer is to the model answer. Score 1.0 if they are the same and 0.0 if they are different.\"\n \" Return just a floating point score\\n\\n\"\n \" Reference answer: {{item.label}}\\n\\n\"\n \" Model answer: {{sample.output_text}}\"\n ),\n }\n ],\n \"model\": \"o4-mini-2025-04-16\",\n \"sampling_params\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"seed\": 42,\n \"max_completions_tokens\": 32768,\n \"reasoning_effort\": \"medium\"\n },\n}\n"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

🧩 Analysis chain

Fix example to match the canonical key and verify model id.

Update example key to max_completion_tokens. Also verify o4-mini-2025-04-16 is the correct, GA model identifier.

-        "max_completions_tokens": 32768,
+        "max_completion_tokens": 32768,

🌐 Web query:

Is "o4-mini-2025-04-16" the correct, currently available OpenAI model id for scoring/graders?

💡 Result:

Short answer: No.

Details: o4-mini-2025-04-16 is a real OpenAI model released April 16, 2025. However Microsoft/Azure's grader (score_model) docs list supported grader model ids as gpt-4o-2024-08-06 and o3-mini-2025-01-31 — they do not list o4-mini-2025-04-16 as a supported grader. [1][2]

Sources:

  • OpenAI announcement for o3 and o4-mini (release date Apr 16, 2025). [1]
  • Azure OpenAI / Azure AI Foundry docs showing supported grader models (gpt-4o-2024-08-06, o3-mini-2025-01-31). [2]

Use canonical key and replace unsupported grader model

File: src/libs/tryAGI.OpenAI/openapi.yaml — update example key and replace the grader model id: Azure's grader docs list gpt-4o-2024-08-06 and o3-mini-2025-01-31 as supported; o4-mini-2025-04-16 is not listed.

-        "max_completions_tokens": 32768,
+        "max_completion_tokens": 32768,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
example: "{\n \"type\": \"score_model\",\n \"name\": \"Example score model grader\",\n \"input\": [\n {\n \"role\": \"user\",\n \"content\": (\n \"Score how close the reference answer is to the model answer. Score 1.0 if they are the same and 0.0 if they are different.\"\n \" Return just a floating point score\\n\\n\"\n \" Reference answer: {{item.label}}\\n\\n\"\n \" Model answer: {{sample.output_text}}\"\n ),\n }\n ],\n \"model\": \"o4-mini-2025-04-16\",\n \"sampling_params\": {\n \"temperature\": 1,\n \"top_p\": 1,\n \"seed\": 42,\n \"max_completions_tokens\": 32768,\n \"reasoning_effort\": \"medium\"\n },\n}\n"
"max_completion_tokens": 32768,
🤖 Prompt for AI Agents
In src/libs/tryAGI.OpenAI/openapi.yaml around line 16002, the example uses a
non-canonical API key placeholder and an unsupported grader model id; replace
the example key with the project's canonical placeholder (e.g., OPENAI_API_KEY
or the established project key name) and swap the grader model id to one of
Azure's supported models such as gpt-4o-2024-08-06 or o3-mini-2025-01-31 in the
example, ensuring the value and model id match the documented Azure grader
options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants